//
//  Z_FindingNewDetaileViewController.m
//  SpaceMovie
//
//  Created by nana on 15/3/17.
//  Copyright (c) 2015年 nana. All rights reserved.
//

#import "Z_FindingNewDetaileViewController.h"
#import "Connection.h"

@interface Z_FindingNewDetaileViewController ()

@end

@implementation Z_FindingNewDetaileViewController
- (void)dealloc
{
    [_findingNewModel release];
    [_timeLabel release];
    [super dealloc];
}
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.findingNewModel = [[Z_FindingNewModel alloc] init];
        [_findingNewModel release];
    }
    return self;
}
- (void)creatSubview
{
    self.titleLabel = [[UILabel alloc] initWithFrame:(CGRectMake(20, 35, 300, 50))];
    [self.titleLabel setBackgroundColor:[UIColor redColor]];
    [self.view addSubview:_titleLabel];
    [_timeLabel release];

    self.timeLabel = [[UILabel alloc] initWithFrame:(CGRectMake(20, 120, 100, 25))];
    [self.timeLabel setBackgroundColor:[UIColor blackColor]];
    [self.view addSubview:_timeLabel];
    [_timeLabel release];
    
    
//    UIWebView *web = [[UIWebView alloc] initWithFrame:(CGRectMake(0, 150, self.view.frame.size.width, self.view.frame.size.height))];
    
    
    
}

- (void)beginConnection
{
    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
    NSString *str =[NSString stringWithFormat:@"%@", _findingNewModel.findingNew_id];
    [dic setObject:str forKey:@"newsId"] ;
    [Connection connectionWithUrl:Z_FindingNewDetail parmaters:dic block:^(NSData *data) {
        
        // 解析JSON
        NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
        
        
    
    
    
    
    
    
    }];
    
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.translucent = NO;
    [self.view setBackgroundColor:[UIColor whiteColor]];
    self.navigationController.navigationBar.barTintColor = [UIColor blueColor];
    [self creatSubview];
    [self beginConnection];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
